﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Coldairarrow.Entity.Interface
{
    /// <summary>
    /// 易仓入库单
    /// </summary>
    /// 

    public class ReceiveDTO
    {
        public string code { get; set; }
        public string message { get; set; }
        public string requestId { get; set; }
        public long timestamp { get; set; }
        public string version { get; set; }
        public string nonce_str { get; set; }
        public string sign_type { get; set; }
        public string sign { get; set; }
        public string biz_content { get; set; }

    }


    public class ReceiveDTO_Data
    {
        public string total { get; set; }
        public string pi_id { get; set; }
        public int page { get; set; }
        public int page_size { get; set; }
        public List<Receive> data { get; set; }
    }

    public class Receive
    {
        public string ID { get; set; }
        public string RowId { get; set; }

        /// <summary>
        /// 入库单号
        /// </summary>
        public string receiving_code { get; set; }

        /// <summary>
        /// 客户参考号
        /// </summary>
        public string reference_no { get; set; }
        /// <summary>
        /// 采购单号
        /// </summary>
        public string po_code { get; set; }
        /// <summary>
        /// 仓库Id
        /// </summary>
        public string warehouse_id { get; set; }

        /// <summary>
        /// 跟踪号	
        /// </summary>
        public string tracking_number { get; set; }
        /// <summary>
        /// 目的仓库Id	
        /// </summary>
        public string to_warehouse_id { get; set; }
        /// <summary>
        /// 仓库名称	
        /// </summary>
        public string warehouse_name { get; set; }
        /// <summary>
        /// 客户代码	
        /// </summary>
        public string customer_code { get; set; }
        /// <summary>
        /// 单据类型	
        /// </summary>

        private string _receiving_type;
        public string receiving_type
        {
            get
            {
                return _receiving_type;
            }

            set
            {
                if (value == "0") _receiving_type = "标准";
                else if (value == "1") _receiving_type = "订单退货";
                else if (value == "2") _receiving_type = "指定产品退件";
                else if (value == "3") _receiving_type = "中转";
                else if (value == "4") _receiving_type = "采购";
                else if (value == "5") _receiving_type = "其它";
                else if (value == "6") _receiving_type = "借用归还入库";
                else if (value == "7") _receiving_type = "初始化库存";
                else if (value == "8") _receiving_type = "不良品入库";
                else if (value == "9") _receiving_type = "盘盈";
                else if (value == "10") _receiving_type = "调拨";
                else if (value == "11") _receiving_type = "换货";
                else if (value == "12") _receiving_type = "同步服务商库存";
                else _receiving_type = value;
            }

        }

        /// <summary>
        /// 中转状态
        /// </summary>
        private string _receiving_transfer_status;
        public string receiving_transfer_status
        {
            get
            {
                return _receiving_transfer_status;
            }

            set
            {
                if (value == "0") _receiving_transfer_status = "草稿";
                else if (value == "1") _receiving_transfer_status = "待处理";
                else if (value == "2") _receiving_transfer_status = "处理中";
                else if (value == "3") _receiving_transfer_status = "处理完成";
                else _receiving_transfer_status = value;
            }

        }

        /// <summary>
        /// 中转状态
        /// </summary>
        private string _receiving_status;
        public string receiving_status
        {
            get
            {
                return _receiving_status;
            }

            set
            {
                if (value == "0") _receiving_status = "删除";
                else if (value == "1") _receiving_status = "草稿";
                else if (value == "2") _receiving_status = "确认";
                else if (value == "3") _receiving_status = "待审核";
                else if (value == "4") _receiving_status = "审核";
                else if (value == "5") _receiving_status = "在途";
                else if (value == "6") _receiving_status = "收货中";
                else if (value == "7") _receiving_status = "收货完成";
                else _receiving_status = value;
            }

        }

        /// <summary>
        /// 备注	
        /// </summary>
        public string receiving_description { get; set; }

        /// <summary>
        /// 退件单号	
        /// </summary>
        public string rma_code { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        public string receiving_add_time { get; set; }

        /// <summary>
        /// 更新时间	
        /// </summary>
        public string receiving_update_time { get; set; }

        /// <summary>
        /// 入库单Id
        /// </summary>
        public string receiving_id { get; set; }

        /// <summary>
        /// 预计到达时间
        /// </summary>
        public string expected_date { get; set; }

        /// <summary>
        /// 仓库	
        /// </summary>
        public string warehouse { get; set; }
        /// <summary>
        /// 处理收货异常	
        /// </summary>
        public string receiving_ex_status { get; set; }
        /// <summary>
        /// 采购成本	
        /// </summary>
        public string purchase_cost { get; set; }
        /// <summary>
        /// 程成本	
        /// </summary>
        public string transfer_shipping_fee { get; set; }
        /// <summary>
        /// 库存成本	
        /// </summary>
        public string inventory_cost { get; set; }
        /// <summary>
        /// 币种	
        /// </summary>
        public string currency_code { get; set; }
        /// <summary>
        /// 产品信息
        /// </summary>
        public List<product_info> product_info { get; set; }

        /// <summary>
        /// 产品代码	
        /// </summary>
        public string product_barcode { get; set; }
        /// <summary>
        /// 产品名称	
        /// </summary>
        public string product_title { get; set; }
        /// <summary>
        /// 状态码	
        /// </summary>
        public string rd_status { get; set; }
        /// <summary>
        /// 状态名称	
        /// </summary>
        public string rd_status_string { get; set; }
        /// <summary>
        /// 送货数量	
        /// </summary>
        public string rd_receiving_qty { get; set; }
        /// <summary>
        /// 收货数量	
        /// </summary>
        public string rd_received_qty { get; set; }
        /// <summary>
        /// 收货数量差异	
        /// </summary>
        public string dif_receive_num { get; set; }
        /// <summary>
        /// 上架数量	
        /// </summary>
        public string rd_putaway_qty { get; set; }
        /// <summary>
        /// 是否质检	
        /// </summary>
        public string is_qc { get; set; }
        /// <summary>
        /// 优先处理	
        /// </summary>
        public string is_priority { get; set; }
        /// <summary>
        /// 更新时间	
        /// </summary>
        public string rd_update_time { get; set; }
        /// <summary>
        /// 备注	
        /// </summary>
        public string rd_note { get; set; }


        /// <summary>
        /// 更新时间	
        /// </summary>
        public string ec_update_time { get; set; }


    }

    public class product_info
    {
        /// <summary>
        /// 产品代码	
        /// </summary>
        public string product_barcode { get; set; }
        /// <summary>
        /// 产品名称	
        /// </summary>
        public string product_title { get; set; }
        /// <summary>
        /// 状态码	
        /// </summary>
        public string rd_status { get; set; }
        /// <summary>
        /// 状态名称	
        /// </summary>
        public string rd_status_string { get; set; }
        /// <summary>
        /// 送货数量	
        /// </summary>
        public string rd_receiving_qty { get; set; }
        /// <summary>
        /// 收货数量	
        /// </summary>
        public string rd_received_qty { get; set; }
        /// <summary>
        /// 收货数量差异	
        /// </summary>
        public string dif_receive_num { get; set; }
        /// <summary>
        /// 上架数量	
        /// </summary>
        public string rd_putaway_qty { get; set; }
        /// <summary>
        /// 是否质检	
        /// </summary>
        public string is_qc { get; set; }
        /// <summary>
        /// 优先处理	
        /// </summary>
        public string is_priority { get; set; }
        /// <summary>
        /// 更新时间	
        /// </summary>
        public string rd_update_time { get; set; }
        /// <summary>
        /// 备注	
        /// </summary>
        public string rd_note { get; set; }


    }
}
